docs(agents): never commit review artifacts to a contributor's fork - #286
Merged
Conversation
The artifact rule said "PR review -> on the PR branch" without qualifying who owns it, so reviewing a community PR meant pushing to the contributor's branch. That happened on two fork PRs this week. maintainerCanModify makes the push possible; it is not permission. It also backfires mechanically: this repo dismisses stale reviews on push, so the review-doc commit dismisses the approval it documents and staleness-flags the approval label against the new head. Fork PRs now have no committed artifact — the formal review body is the artifact. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GvZKP1JeXgHFCovTaAPT5B
vsits-proxy-builder
Bot
force-pushed
the
fix/agents-no-fork-writes
branch
from
July 31, 2026 16:12
6d5c2ec to
c7d4394
Compare
cnighswonger
approved these changes
Jul 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
AGENTS.mdtold the review agent to commit PR review artifacts "on the PR branch," without qualifying who owns that branch. On a community PR from a fork, following that instruction literally means pushing to the contributor's branch — and that is what happened this week on #274 (Gunther-Schulz:pr/header-propagation) and #277 (Gunther-Schulz:pr/graceful-stop). Both pushes have been reverted; the branches are back to the contributors' own commits, and an apology is posted on #274.The agent was following our documented rule. The rule is the defect.
Why it matters beyond etiquette
maintainerCanModify: truemakes the push mechanically possible on most community PRs. It is not permission — a contributor's branch is theirs, and a force-visible history rewrite can land on top of local work they have in flight.It also backfires mechanically. This repo dismisses stale reviews on push, so the review-doc commit dismisses the very approval it documents, and any
approved-by-*label instantly goes stale against the new head. Both #274 and #277 ended up with aDISMISSEDapproval and a stale approval label as a direct result.Change
Fork PRs get no committed artifact — the formal
gh pr reviewbody is the artifact. Org-owned PR branches are unchanged. Adds an explicit pre-write check (gh pr view <N> --json headRepositoryOwner).Non-Functional Requirements
Testing
Documentation only — no test surface. Verified the two affected fork branches are restored to their contributors' commits (
4f2eb482on #274,c814fd2fon #277).Note on the pre-push hook
The pre-push guard flagged path leaks and was overridden with
GIT_PUSH_GUARD_ALLOW=1. Every match is in pre-existingmainhistory (olderdocs/code-reviews/artifacts carrying absolute paths), not in this commit.git log origin/main..HEADis a single commit and it contains no paths, hostnames, or addresses. This is the documented rebase-range case.— Proxy Builder